package com.myteam.fugaocrm.util;

import java.util.Base64;

/**
 * Base64加解密
 * @author BZX
 *
 */
public class Base64Util {
	/** 加密 */
	public static String encodeBase64(String str) throws Exception{
		String asB64 = Base64.getEncoder().encodeToString(str.getBytes("utf-8"));  
		return asB64;
	}
	/** 解密 */
	public static String decodeBase64(String str) throws Exception{
		byte[] asBytes = Base64.getDecoder().decode(str);  
		return new String(asBytes, "utf-8");
	}
}
